package com.xsj.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.List;

/**
 * @BelongsProject: wisdom-restaurant-manage
 * @BelongsPackage: com.xsj.vo
 * @Author: tutu
 * @CreateTime: 2025-06-16 14:58
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Cart {

    public String getIcon;
    private Integer userId;
    private Integer goodsId;
    private Integer goodId;
    private Integer goodNum;
    private String goodName;
    private String goodIcon;
    private double price;
    private Integer merchantId;
    private String merchantName;
    private List<Spec> specs;
    private String speId;
    private String valId;
    // 这个字段专门用于传递给 MyBatis Mapper，存入数据库
    // @JsonIgnore注解可以确保在序列化Cart对象回Redis时（如果有此操作）不会包含这个临时字段
    @JsonIgnore
    private String specsJson;

}
